<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function Person(name, age) {
      this.name = name;
      this.age = age;
    }

    function Student(name, age) {
      // Person.call(this,name,age);
      let _this = Reflect.construct(Person, [name, age], Student)
      // 相当于在这里创建对象以后再返回
      return _this
    }

    // let stu = Reflect.construct(Person, ['lll', 12], Student);
    let stu = new Student('qwq', 22)
    console.log(stu);
    console.log(stu.__proto__ === Student.prototype);

  </script>

</body>

</html>